﻿<Window x:Class="MoneyManagerNET.Presentation.View.AssetView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="AssetView" Height="300" Width="300"
        
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
        
        xmlns:vm="clr-namespace:MoneyManagerNET.Presentation.ViewModel;assembly=MoneyManagerNET.Presentation.ViewModel"
             d:DesignHeight="290" d:DesignWidth="382" 
             d:DataContext="{x:Static Member=vm:DesignTimeViewModelSupplier.Asset}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
    <GroupBox  Header="Asset Details">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="132*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="50*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock  Text="Name" />
            <TextBox Grid.Column="1" Text="{Binding Path=Name}" />
            <TextBlock Grid.Column="2" Text="Date" />
            <DatePicker Grid.Column="3" SelectedDate="{Binding Path=Date}" />
            <TextBlock Grid.Row="1" Text="Asset type" />
            <ComboBox Grid.Column="1" Grid.Row="1" ItemsSource="{Binding Path=TypeList}" SelectedValue="{Binding Path=Type}" />
            <TextBlock Grid.Column="2" Grid.Row="1" Text="Value" />
            <TextBlock Grid.Row="2" Text="Change in value" />
            <TextBlock Grid.Column="2" Grid.Row="2" Text="% Rate" />
            <TextBlock Grid.Row="3" Name="textBlock1" Text="Notes" />
            <TextBox Grid.Column="1" VerticalAlignment="Stretch"
                     Grid.Row="3" Name="textBox1" Text="{Binding Path=Notes}" />
            <TextBox Grid.Column="3" Grid.Row="1" Text="{Binding Path=Value}" />
            <TextBox Grid.Column="3" Grid.Row="2" Text="{Binding Path=Rate}" />
            <ComboBox ItemsSource="{Binding Path=ChangeInValueTypes}" SelectedValue="{Binding Path=ChangeInValue}" Grid.Column="1" Grid.Row="2" />
        </Grid>
    </GroupBox>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1">
            <Button Click="Button_Click">Ok</Button>
            <Button Click="Button_Click_1" IsCancel="True">Cancel</Button>
        </StackPanel>
    </Grid>
</Window>
